package org.itzheng.myrxframe.bugly;

import com.tencent.bugly.beta.upgrade.UpgradeStateListener;

import org.itzheng.and.baseutils.log.LogHelper;

/**
 * 监听更新的各个状态，可以替换SDK内置的toast提示
 */
public class BuglyUpgradeStateListener implements UpgradeStateListener {
    private static final String TAG = "BuglyUpgradeStateListen";

    /**
     * 更新失败
     *
     * @param isManual true:手动检查 false:自动检查
     */
    public void onUpgradeFailed(boolean isManual) {
        LogHelper.w(TAG, "onUpgradeFailed: " + isManual);
    }

    /**
     * 更新成功
     *
     * @param isManual
     */
    public void onUpgradeSuccess(boolean isManual) {
        LogHelper.w(TAG, "onUpgradeSuccess: " + isManual);
    }

    /**
     * 没有更新
     *
     * @param isManual
     */
    public void onUpgradeNoVersion(boolean isManual) {
        LogHelper.w(TAG, "onUpgradeNoVersion: " + isManual);
    }

    /**
     * 正在更新
     *
     * @param isManual
     */
    public void onUpgrading(boolean isManual) {
        LogHelper.w(TAG, "onUpgrading: " + isManual);
    }

    /**
     * 下载完成
     *
     * @param b
     */
    @Override
    public void onDownloadCompleted(boolean b) {
        LogHelper.w(TAG, "onDownloadCompleted: " + b);
    }
}
